<h1><?php echo TranslateModule::t('Manage Messages')?></h1>
<table id="pageFooter">
<tr>
	<td  class="texteSimple">
	<?php 
	$source=MessageSource::model()->findAll();
	$this->widget('zii.widgets.grid.CGridView', array(
		'id'=>'message-grid',
		'dataProvider'=>$model->search(),
		'filter'=>$model,
		'cssFile' => Yii::app()->baseUrl . '/css/dbs.css',
		'itemsCssClass' => 'premiumGrid',		
		'columns'=>array(
			array(
	            'name'=>'id',
	            'filter'=>CHtml::listData($source,'id','id'),
	        ),
	        array(
	            'name'=>'message',
	            'filter'=>CHtml::listData($source,'message','message'),
	        ),
	        array(
	            'name'=>'category',
	            'filter'=>CHtml::listData($source,'category','category'),
	        ),
	        array(
	            'name'=>'language',
	            'filter'=>CHtml::listData($model->findAll(new CDbCriteria(array('group'=>'language'))),'language','language')
	        ),
	        'translation',
	        array(
	            'class'=>'CButtonColumn',
	            'template'=>'{update}{delete}',
	        	'deleteButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_delete.png',
	        	'updateButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_modify.png',
	            'updateButtonUrl'=>'Yii::app()->getController()->createUrl("update",array("id"=>$data->id,"language"=>$data->language))',
	            'deleteButtonUrl'=>'Yii::app()->getController()->createUrl("delete",array("id"=>$data->id,"language"=>$data->language))',
	        )
		),
	)); ?>
	
	</td>
</tr>
</table>	